#!/usr/bin/env tcsh -f
echo "MADS-CLEAN deletes MADS generated output files"
if ($# == 0) then
	echo "Are you sure you want to delete all the MADS output files [Y/n]? "
	set answer = $<
	if( answer == 'n' ) then
		exit
	endif
	set mask = '*'
else
	set mask = $1
endif
rm -f $mask.mads_output_* >& /dev/null
rm -f $mask.igrnd_*.results >& /dev/null
rm -f $mask.igpd-* >& /dev/null
rm -f $mask.sobol_sens_index >& /dev/null
rm -f $mask.sobol_sens_total >& /dev/null
rm -f $mask.igrnd-opt=* >& /dev/null
rm -f $mask-error.mads >& /dev/null
rm -f $mask-rerun.mads >& /dev/null
rm -f $mask.running >& /dev/null
rm -f $mask.covar* >& /dev/null
rm -f $mask.corr* >& /dev/null
rm -f $mask.jacob* >& /dev/null
rm -f $mask.eigen >& /dev/null
rm -f $mask.phi >& /dev/null
rm -f $mask.forward >& /dev/null
rm -f $mask.residuals >& /dev/null
rm -f $mask.restart_info >& /dev/null
rm -f $mask.restart*zip >& /dev/null
